home *** CD-ROM | disk | FTP | other *** search
- class §#5§
- {
- static var §#3§ = false;
- static var §#249§ = true;
- static var §#446§ = false;
- static var §#364§ = false;
- var §#122§ = 1;
- var §#150§ = 2;
- var §#145§ = 3;
- var §#152§ = 4;
- static var §#81§ = 15636787;
- static var §#291§ = 16724736;
- static var §#200§ = 52224;
- var §#52§ = 2;
- var §#36§ = 0;
- var §#178§ = 0;
- var §#7§ = 1;
- var §#56§ = 2;
- var §#342§ = 4;
- var §#328§ = 5;
- var §#414§ = 3;
- var level = 0;
- var §#134§ = false;
- var §#356§ = false;
- static var scale = 1;
- var §#355§ = [];
- var §#243§ = [0.5,0.75,1.166667,1.583333,2.083333];
- var §#340§ = false;
- var §#297§ = false;
- function §#5§()
- {
- if(eval("#5")["#3"])
- {
- _root.createEmptyMovieClip("fps",1000);
- _root.fps.loadMovie("#462.swf");
- }
- _quality = "#464";
- Stage.showMenu = false;
- eval("#5").scale = _root.background._width / 702;
- if(eval("#5")["#3"])
- {
- eval("#0").log("width: " + _root.background._width + ", game scale: " + eval("#5").scale);
- }
- this["#138"] = eval("#1").getInstance();
- this["#138"].setupButtons(_root["#72"],_root["#71"]);
- this["#36"] = getTimer();
- this["#178"] = this["#36"];
- this["#8"](this["#122"]);
- this["#102"] = new §#37§();
- this.bonusX2 = new §#68§("bonusX2","x2",142 * eval("#5").scale,21 * eval("#5").scale,-100);
- this.bonusX3 = new §#68§("bonusX3","x3",152 * eval("#5").scale,21 * eval("#5").scale,-110);
- this.bonusX5 = new §#68§("bonusX5","x5",162 * eval("#5").scale,21 * eval("#5").scale,-120);
- this.bonusDisplay = new §#68§("bonusBonus","bonus",143 * eval("#5").scale,30 * eval("#5").scale,-130);
- _root["#327"] = true;
- _root.onEnterFrame = this["#393"];
- if(eval("#5")["#3"])
- {
- eval("#0").log(this["#2"]() + "created game, player id: " + this["#56"] + ", bounds: " + Bounds.toString());
- }
- }
- function §#2§()
- {
- return "Game s" + this["#7"] + " l" + this.level + ": ";
- }
- function §#393§()
- {
- _root["#4"]["#383"]();
- }
- function §#82§()
- {
- this["#52"] = 0;
- this["#355"] = [];
- this["#199"] = 0;
- this["#44"] = 0;
- this.level = 0;
- this["#112"] = 0;
- this["#326"] = 0;
- this["#413"] = 0;
- this["#356"] = false;
- this["#185"]();
- _root["#35"]["#8"](this["#35"]["#33"]);
- this["#191"] = 0;
- this["#297"] = false;
- this["#59"] = false;
- _root.onFire.gotoAndStop("#142");
- _root["#278"].gotoAndStop("#142");
- this["#102"] = new §#37§();
- }
- function §#45§()
- {
- this["#9"]["#135"]();
- this["#134"] = false;
- this.bonusX2.hide();
- this.bonusX3.hide();
- this.bonusX5.hide();
- this.bonusDisplay.hide();
- }
- function §#394§()
- {
- this["#199"] = this["#199"] + 1;
- this["#44"] = 0;
- this["#52"] -= 0.08333333333333333;
- if(_root["#24"]["#203"]())
- {
- this["#102"]["#271"](false,0);
- _root["#24"]["#147"]();
- }
- else if(eval("#37")["#3"])
- {
- var _loc3_ = "miss from outside shot point";
- _root["#143"].text = _loc3_;
- eval("#0").log(this["#2"]() + _loc3_);
- }
- if(!_root["#24"]["#163"]())
- {
- _root["#18"]["#8"](_root["#18"]["#61"]);
- }
- this["#9"]["#135"]();
- }
- function getPlayerNetDistance()
- {
- var _loc4_ = this["#9"]._x - _root["#35"]._x;
- var _loc3_ = this["#9"]._y - _root["#35"]._y;
- var _loc9_ = Math.round(Math.sqrt(_loc4_ * _loc4_ + _loc3_ * _loc3_));
- var _loc6_ = Bounds.getXMin() - _root["#35"]._x;
- var _loc5_ = Bounds.getYMax() - _root["#35"]._y;
- var _loc7_ = Math.round(Math.sqrt(_loc6_ * _loc6_ + _loc5_ * _loc5_));
- var _loc8_ = 100 - Math.round((_loc7_ - _loc9_) / _loc7_ * 100);
- return _loc8_;
- }
- function §#318§()
- {
- _root["#237"].text = "";
- var _loc3_ = Math.floor((getTimer() - this["#36"]) / 1000);
- var _loc4_ = this["#52"] * 60 - _loc3_;
- this["#9"]["#344"]();
- if(this["#60"]["#236"]())
- {
- if(eval("#5")["#3"])
- {
- eval("#0").log(this["#2"]() + "hits complete");
- }
- _root["#4"]["#185"]();
- }
- }
- function §#185§()
- {
- if(eval("#5")["#3"])
- {
- eval("#0").log(this["#2"]() + "next level");
- }
- if(this.level > 0)
- {
- var _loc4_ = Math.floor((getTimer() - this["#36"]) / 1000);
- var _loc3_ = this["#52"] * 60 - _loc4_;
- if(_loc3_ < 0)
- {
- _loc3_ = 0;
- }
- this["#102"]["#361"](this.level,_loc3_);
- this["#52"] = _loc3_ / 60 + this["#243"][this.level];
- }
- else
- {
- this["#52"] = this["#243"][this.level];
- }
- this["#36"] = getTimer();
- this.level = this.level + 1;
- var _loc6_ = Math.floor(this["#52"]);
- var _loc5_ = Math.floor(this["#52"] * 60) % 60;
- _root.levelDisplay.draw(this.level);
- this["#60"]["#82"](5 * this.level);
- _root["#24"].setScale(this.level);
- if(this.level >= 6)
- {
- if(eval("#5")["#3"])
- {
- eval("#0").log(this["#2"]() + "level " + this.level + ", going to game over");
- }
- this.level = 5;
- this["#8"](this["#152"]);
- }
- else
- {
- _root["#24"]["#246"] = 2.5 + this.level / 6;
- _root.levelComplete.number.gotoAndStop(this.level);
- _root.levelComplete.play();
- this["#7"] = this["#150"];
- }
- }
- function §#4#286§()
- {
- }
- function §#8§(§#97§)
- {
- if(this["#7"] == §#97§)
- {
- if(eval("#5")["#3"])
- {
- eval("#0").log(this["#2"]() + "already in state " + this["#7"]);
- }
- return undefined;
- }
- if(§#97§ == this["#150"])
- {
- if(eval("#5")["#3"])
- {
- eval("#0").log(this["#2"]() + "Switching to GAME state");
- }
- this["#60"] = new §#137§(10);
- this["#134"] = false;
- _root.gotoAndStop("#5");
- this["#82"]();
- this["#36"] = getTimer();
- _root["#327"] = false;
- this["#9"] = _root["#370"];
- this["#9"].setID(this["#56"]);
- _root["#250"].setColor(eval("#5")["#81"]);
- _root["#176"].setColor(eval("#5")["#81"]);
- _root["#170"].setColor(eval("#5")["#81"]);
- _root.levelDisplay.setColor(eval("#5")["#200"]);
- this.bonusX2.show();
- this.bonusX3.show();
- this.bonusX5.show();
- this.bonusDisplay.show();
- this["#138"]["#329"](1,3000);
- this["#138"]["#20"](eval("#1")["#202"]);
- }
- else if(§#97§ == this["#122"])
- {
- if(eval("#5")["#3"])
- {
- eval("#0").log(this["#2"]() + "Switching to MENU state");
- }
- this["#340"] = false;
- this["#45"]();
- }
- else if(§#97§ == this["#152"])
- {
- if(eval("#5")["#3"])
- {
- eval("#0").log(this["#2"]() + "Switching to OVER state");
- }
- _root.gotoAndStop("#286");
- this["#138"]["#261"](3000);
- this["#102"]["#357"]();
- this["#45"]();
- }
- this["#7"] = §#97§;
- }
- function score()
- {
- if(_root["#11"]["#206"])
- {
- eval("#1").getInstance()["#20"](eval("#1")["#251"]);
- }
- else
- {
- eval("#1").getInstance()["#20"](eval("#1")["#252"]);
- }
- _root["#35"]["#8"](_root["#35"]["#164"]);
- if(!_root["#24"]["#203"]())
- {
- if(eval("#37")["#3"])
- {
- var _loc3_ = "score from outside shot point";
- _root["#143"].text = _loc3_;
- eval("#0").log(this["#2"]() + _loc3_);
- }
- this["#44"] = 0;
- this["#9"]["#135"]();
- _root["#18"]["#8"](_root["#18"]["#61"]);
- return undefined;
- }
- this["#199"] = 0;
- this["#44"] = this["#44"] + 1;
- this["#102"]["#271"](true,this["#44"]);
- _root["#24"]["#147"]();
- if(this["#44"] == 5)
- {
- _root.onFire.play();
- }
- if(this["#44"] == 15)
- {
- _root["#278"].play();
- _root["#193"]["#254"]("You\'re on a streak!");
- }
- if(this["#44"] >= 5)
- {
- this["#9"]["#307"]();
- _root["#18"]["#8"](_root["#18"]["#233"]);
- }
- else
- {
- _root["#18"]["#8"](_root["#18"]["#90"]);
- }
- }
- function §#383§()
- {
- if(this["#7"] == this["#150"] || this["#7"] == this["#145"])
- {
- if(!this["#134"])
- {
- _root["#24"]["#147"]();
- this["#134"] = true;
- }
- this["#349"]();
- if(this["#9"].hitTest(_root["#24"]))
- {
- _root["#24"]["#8"](_root["#24"]["#183"]);
- }
- else
- {
- _root["#24"]["#8"](_root["#24"]["#165"]);
- }
- _root["#193"].setVisible(true);
- this["#333"]();
- if(this["#191"] < getTimer() && this["#7"] == this["#145"])
- {
- if(eval("#5")["#3"])
- {
- eval("#0").log(this["#2"]() + "time up");
- }
- this["#185"]();
- }
- if(this["#338"] < getTimer() && this["#59"])
- {
- this.bonusDisplay["#111"]();
- this.bonusX2["#111"]();
- this.bonusX3["#111"]();
- this.bonusX5["#111"]();
- this["#59"] = false;
- }
- this["#9"].update(getTimer() - this["#178"]);
- _root["#18"].update();
- this["#60"].update();
- _root["#451"].update();
- this["#178"] = getTimer() - this["#36"];
- }
- else if(this["#7"] != this["#152"])
- {
- if(this["#7"] == this["#122"])
- {
- this["#350"]();
- }
- }
- }
- function §#403§(n)
- {
- if(n == 1)
- {
- return "#470";
- }
- if(n == 2)
- {
- return "#471";
- }
- return "#454";
- }
- function §#420§(§#426§)
- {
- return true;
- }
- function §#333§()
- {
- var _loc6_ = Math.floor((getTimer() - this["#36"]) / 1000);
- var _loc5_ = this["#52"] * 60 - _loc6_;
- var _loc4_ = Math.floor(_loc5_ / 60);
- var _loc3_ = Math.floor(_loc5_ - _loc4_ * 60);
- if(_loc4_ < 0)
- {
- _loc4_ = 0;
- _loc3_ = 0;
- }
- _root["#250"].draw(_loc4_);
- if(_loc3_ <= 0)
- {
- _root["#176"].draw(0);
- }
- else
- {
- _root["#176"].draw(eval("#14").getDigit(_loc3_,1));
- }
- if(_loc3_ < 10)
- {
- _root["#170"].draw(0);
- }
- else
- {
- _root["#170"].draw(eval("#14").getDigit(_loc3_,2));
- }
- if(_loc5_ <= 0 && this["#7"] != this["#145"])
- {
- eval("#1").getInstance()["#20"](eval("#1")["#196"]);
- if(this["#9"]["#47"])
- {
- this["#191"] = getTimer() + 2000;
- }
- else
- {
- this["#191"] = getTimer();
- }
- this["#8"](this["#145"]);
- }
- }
- function §#350§()
- {
- }
- function §#349§()
- {
- var _loc3_ = false;
- if(Key.isDown(32) || Key.isDown(13))
- {
- if(!this["#9"]["#47"] && !this["#9"]["#57"] && this["#9"]["#11"]._visible)
- {
- _root["#4"]["#9"]["#392"]();
- _loc3_ = true;
- return undefined;
- }
- }
- else
- {
- this["#9"]["#205#10"]();
- }
- if(this["#9"]["#47"])
- {
- return undefined;
- }
- if(Key.isDown(39))
- {
- _root["#4"]["#9"]["#351"](Key.isDown(38) || Key.isDown(40));
- _loc3_ = true;
- }
- else if(Key.isDown(37))
- {
- _root["#4"]["#9"]["#368"](Key.isDown(38) || Key.isDown(40));
- _loc3_ = true;
- }
- if(Key.isDown(38))
- {
- _root["#4"]["#9"]["#382"](Key.isDown(37) || Key.isDown(39));
- _loc3_ = true;
- }
- else if(Key.isDown(40))
- {
- _root["#4"]["#9"]["#367"](Key.isDown(37) || Key.isDown(39));
- _loc3_ = true;
- }
- else if(Key.isDown(27))
- {
- _root["#4"]["#8"](this["#152"]);
- }
- if(!_loc3_)
- {
- _root["#4"]["#9"]["#391"]();
- }
- }
- }
-